CLOSE
The CLOSE statement closes an open cursor. Once closed, the cursor cannot be used for further processing.
General format
EXEC SQL [ AT Database ] CLOSE Cursor-Name END-EXEC |
Syntax rules
General rules
1. Cursor-Name must be previously defined by a
DECLARE statement.
2. Database identifies the active connection that will execute the query and must be previously defined using a Format 4
DECLARE statement. By default, when the AT clause is used, the active connection is switched to the connection identified by
Database and all the next statements will work on that connection; under the
-csora option, instead, the connection is switched only for the current statement.
Examples
Close cursor
exec sql close cust_cur end-exec |